{% extends "sentry/bases/organization.html" %}

{% load crispy_forms_tags %}
{% load i18n %}
{% load sentry_helpers %}

{% block org_settings_nav %}active{% endblock %}

{% block main %}
  <div class="page-header">
    <h2>{% trans "Remove Organization" %}</h2>
  </div>

  <form class="form-stacked" action="" method="post">
    {% csrf_token %}

    <p><strong>{% trans "Removing this organization is permanent and cannot be undone!" %}</strong></p>

    {% if team_list %}
      <p>{% trans "This will also remove the following teams and all associated projects:" %}</p>

      <ul>
        {% for team in team_list %}
          <li>{{ team.name }}</li>
        {% endfor %}
      </ul>
    {% endif %}

    {{ form|as_crispy_errors }}

    {% for field in form %}
        {{ field|as_crispy_field }}
    {% endfor %}

    <fieldset class="form-actions">
      <button type="submit" class="btn btn-danger">{% trans "Remove Organization" %}</button>
      <a href="{% absolute_uri '/organizations/{}/settings/' organization.slug %}" class="btn btn-default">{% trans "Cancel" %}</a>
    </fieldset>
  </form>
{% endblock %}
